package com.homestead.controller.ao;

import cn.hutool.core.bean.BeanUtil;
import com.homestead.bo.CreateUserBo;
import com.homestead.convert.AbstractConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author HanBin_Yang
 * @since 2021/4/10 17:43
 */
@ApiModel(value = "创建用户-入参")
@Data
public class CreateUserAo extends AbstractConverter<CreateUserBo> {
    @ApiModelProperty(value = "用户名", required = true, example = "肖笑")
    private String userName;
    @ApiModelProperty(value = "手机号", required = true, example = "13800000081")
    private String mobile;
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;
    @ApiModelProperty(value = "性别 0男 1女", required = true, example = "0")
    private Integer sex;

    @Override
    public CreateUserBo convert() {
        CreateUserBo bo = new CreateUserBo();
        BeanUtil.copyProperties(this, bo);
        return bo;
    }
}
